// 车险人员性质
import {creatEnum} from '@/utils/tools'

const conf = {
    personal: '个人',
    company: '单位'
}

const ChToEn = creatEnum(['个人', '单位']);
const EnToCh = creatEnum(['personal', 'company']);

export default {
    
    // 配置
    conf,
    
    // 接口转换
    transition(key:string):string {
        let end:string = '';

        if(ChToEn[key] !== undefined){
            end = <string>EnToCh[<number>ChToEn[key]];
        }else if(EnToCh[key] !== undefined){
            end = <string>ChToEn[<number>EnToCh[key]];
        }

        return end
    }
    
    
}